package com.shazhu.nongjt.service.impl;

import java.util.List;
import com.shazhu.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.shazhu.nongjt.mapper.NjtInspectionRecordMapper;
import com.shazhu.nongjt.domain.NjtInspectionRecord;
import com.shazhu.nongjt.service.INjtInspectionRecordService;

/**
 * 检查记录Service业务层处理
 * 
 * @author shazhu
 * @date 2025-09-29
 */
@Service
public class NjtInspectionRecordServiceImpl implements INjtInspectionRecordService 
{
    @Autowired
    private NjtInspectionRecordMapper njtInspectionRecordMapper;

    /**
     * 查询检查记录
     * 
     * @param id 检查记录主键
     * @return 检查记录
     */
    @Override
    public NjtInspectionRecord selectNjtInspectionRecordById(Long id)
    {
        return njtInspectionRecordMapper.selectNjtInspectionRecordById(id);
    }

    /**
     * 查询检查记录列表
     * 
     * @param njtInspectionRecord 检查记录
     * @return 检查记录
     */
    @Override
    public List<NjtInspectionRecord> selectNjtInspectionRecordList(NjtInspectionRecord njtInspectionRecord)
    {
        return njtInspectionRecordMapper.selectNjtInspectionRecordList(njtInspectionRecord);
    }

    /**
     * 新增检查记录
     * 
     * @param njtInspectionRecord 检查记录
     * @return 结果
     */
    @Override
    public int insertNjtInspectionRecord(NjtInspectionRecord njtInspectionRecord)
    {
        njtInspectionRecord.setCreateTime(DateUtils.getNowDate());
        return njtInspectionRecordMapper.insertNjtInspectionRecord(njtInspectionRecord);
    }

    /**
     * 修改检查记录
     * 
     * @param njtInspectionRecord 检查记录
     * @return 结果
     */
    @Override
    public int updateNjtInspectionRecord(NjtInspectionRecord njtInspectionRecord)
    {
        njtInspectionRecord.setUpdateTime(DateUtils.getNowDate());
        return njtInspectionRecordMapper.updateNjtInspectionRecord(njtInspectionRecord);
    }

    /**
     * 批量删除检查记录
     * 
     * @param ids 需要删除的检查记录主键
     * @return 结果
     */
    @Override
    public int deleteNjtInspectionRecordByIds(Long[] ids)
    {
        return njtInspectionRecordMapper.deleteNjtInspectionRecordByIds(ids);
    }

    /**
     * 删除检查记录信息
     * 
     * @param id 检查记录主键
     * @return 结果
     */
    @Override
    public int deleteNjtInspectionRecordById(Long id)
    {
        return njtInspectionRecordMapper.deleteNjtInspectionRecordById(id);
    }
}
